<template>
  <div class="input">
    <slot name="input_l"></slot>
    <input type="text" :style="{backgroundColor:bgc,color}"/>
    <slot name="input_r"></slot>
  </div>
</template>

<script>
export default {
  name: "Input",
  props:{
    bgc:{
      type:String,
      default:'rgba(0,0,0,.3)'
    },
    color:{
      type:String,
      default:'#fff'
    }
  }
};
</script>

<style lang="less" scoped>
.input {
  width: 100%;
  position: relative;
  input {
    border: none;
    
    padding: 4PX 24PX 4PX 24PX;
    height: 25PX;
    width: 100%;
    border-radius: 5PX;
    font-size: 12PX;
  }
  .l_icon,.r_icon{
    display: block;
    width: 16PX;
    height: 16PX;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
  }
  .l_icon{
    left: 4PX;
  }
  .r_icon{
    right: 4PX;
  }
}
</style>